{% extends "base.html" %}

{% block body %}
  {% if errors %}
    <h1>本次上传共失败{{errors|length}}条</h1>
    {% for e in errors %}
      {{e}}<br/>
    {% endfor %}
  {% endif %}
  {% if buyers %}
    <h1>本次共上传买家信息成功{{buyers|length}}条</h1>
    <a href="/">查看所有买家信息</a>
    <table width="100%" border="1">
        <tr>
            <td align="center">Contact Person</td>
            <td align="center">Company Name</td>
            <td align="center">Country/Region</td>
        </tr>
      {% for buyer in buyers %}
        <tr>
            <td align="left"><a href="/showbuyer?key={{buyer.key}}">{{buyer.contactName}}</a></td>
            <td>{{ buyer.companyName }}</td>
            <td>{{buyer.area}} - {{buyer.country}}</td>
        </tr>
      {% endfor %}
    </table>
  {% else %}
    <h1>本次没有上传成功任何买家信息，<a href="/admin/uploadbuyer">继续上传</a></h1>
  {% endif %}
{% endblock %}
